<?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('public/header', TEMPLATE_INCLUDEPATH)) : (include template('public/header', TEMPLATE_INCLUDEPATH));?>
<?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('public/comhead', TEMPLATE_INCLUDEPATH)) : (include template('public/comhead', TEMPLATE_INCLUDEPATH));?>
<link rel="stylesheet" type="text/css" href="../addons/zh_cjdianc/template/public/ygcsslist.css">
<style type="text/css">
    .yg5_key>div{float: left;line-height: 34px;}
    .store_td1{height: 45px;}
    .store_list_img{width: 40px;height: 40px;}
    .yg5_tabel{border-color: #e5e5e5;outline: 1px solid #e5e5e5;font-size: 12px;}
    .yg5_tr2>td{padding: 10px 15px;border: 1px solid #e5e5e5;text-align: center;}
    .yg5_tr1>th{
        border: 1px solid #e5e5e5;
        padding-left: 15px;
        background-color: #FAFAFA;
        font-weight: bold;
        text-align: center;
    }
    .yg5_btn{background-color: #EEEEEE;color: #333;border: 1px solid #E4E4E4;border-radius: 6px;width: 100px;height: 34px;}
    .store_inp{margin-left: 5px;}
    .ygshanchu{color: white;background-color: #44ABF7;}
    .accout_inp{width: 100%;height: 35px;border: 1px solid #cccccc;font-size: 14px;color: #333;}
/*    .navback{display: none;}
    .yg_back{margin-left: 170px;}*/
    .scour{
      position: relative;
      width: 100%;
      display: block;
    }
    .scour:hover .scour_tip{
      display: block;
    }
    .scour_tip{
      display: none;
      position: absolute;
      left: 50%;
      bottom: 27px;
      background-color: #333;
      color: white;
      padding: 2px 7px;
      border-radius: 2px;
      font-size: 10px;
      margin-left: -20px
    }
    .scour_tip:after{
      content: "";
      display:block;
      width: 0;
      height: 0;
      border-bottom: 10px solid #333;
      border-left: 10px solid transparent;
      transform: rotate(45deg);
      position: absolute;
      left: 40%;
      top: 78%;
    }
</style>
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>
    <li  <?php  if($type=='0') { ?> class="active" <?php  } ?>><a href="<?php  echo $this->createWebUrl('yyy',array('type'=>0));?>">全部</a></li>
    <li  <?php  if($type=='1') { ?> class="active" <?php  } ?>><a href="<?php  echo $this->createWebUrl('yyy',array('type'=>1));?>">免费摇</a></li>
    <li   <?php  if($type=='2') { ?> class="active" <?php  } ?>><a href="<?php  echo $this->createWebUrl('yyy',array('type'=>2));?>">1元摇</a></li>
    <li   <?php  if($type=='3') { ?> class="active" <?php  } ?>><a href="<?php  echo $this->createWebUrl('yyy',array('type'=>3));?>">会员摇</a></li>
</ul>
<div class="main">
    <div class="panel panel-default">
        <div class="panel-body">

        <form action="" method="get" class="col-md-4" style="width: 70%;">
           <input type="hidden" name="c" value="site" />
           <input type="hidden" name="a" value="entry" />
           <input type="hidden" name="m" value="zh_cjdianc" />
           <input type="hidden" name="do" value="yyy" />
            <div class="col-md-3 yg5_key" style="width: 55%;">
                <div>类型：</div>
                <select class="input-group" style="width: 200px" name="type">
                    <option value="">不限</option>
                    <option value="1" <?php  if($type=='1') { ?>selected='selected'<?php  } ?>>免费摇</option>
                    <option value="2" <?php  if($type=='2') { ?>selected='selected'<?php  } ?>>一元摇</option>
                    <option value="3" <?php  if($type=='3') { ?>selected='selected'<?php  } ?>>会员摇</option>
                    <option value="4" <?php  if($type=='4') { ?>selected='selected'<?php  } ?>>会员9.9元摇</option>
                    <option value="5" <?php  if($type=='5') { ?>selected='selected'<?php  } ?>>会员39元摇</option>
                    <option value="6" <?php  if($type=='6') { ?>selected='selected'<?php  } ?>>会员99元摇</option>
                </select>
            </div>

            <div class="input-group" style="width: 400px">
                <?php  echo tpl_form_field_daterange('time',$_GPC['time'],true);?>
                <input type="submit" class="btn yg5_btn" name="submit" value="搜索"/>
                <input type="hidden" name="token" value="<?php  echo $_W['token'];?>"/>
            </div>
            <!--<div class="input-group" style="width: 300px">-->
                <!--<input type="text" name="keywords" class="form-control" placeholder="请输入昵称">-->
                <!--<span class="input-group-btn">-->
                    <!--<input type="submit" class="btn btn-default" name="submit" value="查找"/>-->
                <!--</span>-->
            <!--</div>-->
            <input type="hidden" name="token" value="<?php  echo $_W['token'];?>"/>
        </form>
       
    
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading">
            列表
        </div>
        <div class="panel-body" style="padding: 0px 15px;">
            <div class="row">
                <table class="yg5_tabel col-md-12" id="test_table">
                    <tr class="yg5_tr1">
                    <!-- 批量部分 -->
<!--                         <th class="store_td1 col-md-1">
                            <input type="checkbox" class="allcheck" />
                            <span class="store_inp">全选</span>
                        </th> -->
                    <!-- 批量部分 -->
                        <th class="store_td1 col-md-1" >id</th>
                        <th class="col-md-1">类型</th>
                        <th class="store_td1 col-md-1">成为总人数</th>
                        <th class="col-md-1">成为支付总金额</th>
                         <th class="col-md-1">使用人数</th>
                         <th class="col-md-1">使用次数</th>
                        <th class="col-md-1">奖励金额</th>
                        <th class="col-md-1">时间</th>
                        <!--<th class="col-md-1">钱包余额</th>-->
                        
                        <!--<th class="col-md-2">操作</th>-->
                    </tr>
                      <?php  if(is_array($list)) { foreach($list as $row) { ?>
                    <tr class="yg5_tr2">
                    <!-- 批量部分 -->
       <!--                  <td>
                            <input type="checkbox" name="test" value="<?php  echo $row['id'];?>">
                        </td> -->
                    <!-- 批量部分 -->
                        <td ><?php  echo $row['id'];?></td>
                        <td><?php  echo $row['type'];?></td>
                        <td><?php  echo $row['cw_people'];?></td>
                        <td><?php  echo $row['pay_price'];?></td>
                         <td><?php  echo $row['use_people'];?></td>
                          <td><?php  echo $row['use_num'];?></td>
                        <td><?php  echo $row['award_price'];?></td>
                        <td><?php  echo $row['create_time'];?></td>
                    </tr>
                    <?php  } } ?>
                      <?php  if(empty($list)) { ?>
                    <tr class="yg5_tr2">
                        <td colspan="9">
                          暂无信息
                        </td>
                    </tr>
                    <?php  } ?>
                     
                    
                </table>
            </div>
        </div>
    </div>
</div>
<div class="text-right we7-margin-top">
     <?php  echo $pager;?>
</div>


<!-- <?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?> -->
<script type="text/javascript">
    $(function(){
        $("#frame-16").addClass("in");
        $("#frame-16").show();
        $("#yframe-16").addClass("wyactive");

        $("#allselect").on('click',function(){
            var check = $("input[type=checkbox][class!=allcheck]:checked");
            if(check.length < 1){
                alert('请选择要删除的会员!');
                return false;
            }else if(confirm("确认要删除此会员?")){
                var id = new Array();
                check.each(function(i){
                    id[i] = $(this).val();
                });
               // console.log(id)
                $.ajax({
                    type:"post",
                    url:"<?php  echo $_W['siteroot'];?>/app/index.php?i=<?php  echo $_W['uniacid'];?>&c=entry&do=UpdUser&m=zh_cjdianc",
                    dataType:"text",
                    data:{id:id},
                    success:function(data){
                        console.log(data);
                        location.reload();
                    }
                })

            }
        });
        $(".allcheck").on('click',function(){
            var checked = $(this).get(0).checked;
            $("input[type=checkbox]").prop("checked",checked);
        });

    })
</script>
